package file;

import java.io.File;

public class FileInfo {
	private File file;
	private String html;
	private String path;
	private String pdf;
	private String tex;

	public FileInfo(File file) {
		this.file = file;
		updateInfo();
	}

	public File getFile() {
		return file;
	}

	public String getHtml() {
		return html;
	}

	public String getPath() {
		return path;
	}

	public String getPdf() {
		return pdf;
	}

	public String getTex() {
		return tex;
	}

	public void setFile(File file) {
		this.file = file;
		updateInfo();
	}

	private void updateInfo() {
		tex = file.getPath();
		int docindex = tex.lastIndexOf(".");
		String head = tex.substring(0, docindex);
		html = head + ".html";
		pdf = head + ".pdf";
		path = file.getParent();
	}
}
